package com.ruoyi.youtian.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.youtian.mapper.ScdwStatisticalFrequencyMapper;
import com.ruoyi.youtian.domain.ScdwStatisticalFrequency;
import com.ruoyi.youtian.service.IScdwStatisticalFrequencyService;
import com.ruoyi.common.core.text.Convert;

/**
 * 统计分析按区站频率设置Service业务层处理
 * 
 * @author bl
 * @date 2022-11-29
 */
@Service
public class ScdwStatisticalFrequencyServiceImpl implements IScdwStatisticalFrequencyService 
{
    @Autowired
    private ScdwStatisticalFrequencyMapper scdwStatisticalFrequencyMapper;

    /**
     * 查询统计分析按区站频率设置
     * 
     * @param id 统计分析按区站频率设置主键
     * @return 统计分析按区站频率设置
     */
    @Override
    public ScdwStatisticalFrequency selectScdwStatisticalFrequencyById(Long id)
    {
        return scdwStatisticalFrequencyMapper.selectScdwStatisticalFrequencyById(id);
    }

    /**
     * 查询统计分析按区站频率设置列表
     * 
     * @param scdwStatisticalFrequency 统计分析按区站频率设置
     * @return 统计分析按区站频率设置
     */
    @Override
    public List<ScdwStatisticalFrequency> selectScdwStatisticalFrequencyList(ScdwStatisticalFrequency scdwStatisticalFrequency)
    {
        return scdwStatisticalFrequencyMapper.selectScdwStatisticalFrequencyList(scdwStatisticalFrequency);
    }

    /**
     * 新增统计分析按区站频率设置
     * 
     * @param scdwStatisticalFrequency 统计分析按区站频率设置
     * @return 结果
     */
    @Override
    public int insertScdwStatisticalFrequency(ScdwStatisticalFrequency scdwStatisticalFrequency)
    {
        scdwStatisticalFrequency.setCreateTime(DateUtils.getNowDate());
        return scdwStatisticalFrequencyMapper.insertScdwStatisticalFrequency(scdwStatisticalFrequency);
    }

    /**
     * 修改统计分析按区站频率设置
     * 
     * @param scdwStatisticalFrequency 统计分析按区站频率设置
     * @return 结果
     */
    @Override
    public int updateScdwStatisticalFrequency(ScdwStatisticalFrequency scdwStatisticalFrequency)
    {
        scdwStatisticalFrequency.setUpdateTime(DateUtils.getNowDate());
        return scdwStatisticalFrequencyMapper.updateScdwStatisticalFrequency(scdwStatisticalFrequency);
    }

    /**
     * 批量删除统计分析按区站频率设置
     * 
     * @param ids 需要删除的统计分析按区站频率设置主键
     * @return 结果
     */
    @Override
    public int deleteScdwStatisticalFrequencyByIds(String ids)
    {
        return scdwStatisticalFrequencyMapper.deleteScdwStatisticalFrequencyByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除统计分析按区站频率设置信息
     * 
     * @param id 统计分析按区站频率设置主键
     * @return 结果
     */
    @Override
    public int deleteScdwStatisticalFrequencyById(Long id)
    {
        return scdwStatisticalFrequencyMapper.deleteScdwStatisticalFrequencyById(id);
    }
}
